@ECHO OFF

IF NOT EXIST win32-bin GOTO NoWin32Bin

COPY win32-bin\lua5.1.4\lua5.1.exe win32-bin\lua5.1.exe
COPY win32-bin\lua5.1.4\lua5.1.dll win32-bin\lua5.1.dll
COPY win32-bin\lua5.1.4\lua51.dll win32-bin\lua51.dll

win32-bin\lua5.1.exe -e "package.path='lua\\?.lua;lua\\?\\init.lua;lua\\?\\?.lua' package.cpath='?.dll;win32-bin\\?.dll'" main.lua
GOTO END

:NoWin32Bin
ECHO.
ECHO You need the "win32-bin" folder here for this to work.
ECHO.
PAUSE
GOTO END

:END